﻿using System;
using System.Collections.Generic;

namespace DatabaseGroup.SSIS.SourceAdapters.View
{
    /// <summary>
    /// Defines functionality relating to the Preview tab of the Editor view
    /// </summary>
    public interface IEditorPreviewView : IEditorBaseView
    {
        /// <summary>
        /// Indicates the preview rows should be refreshed with the
        /// current settings
        /// </summary>
        event EventHandler RefreshPreview;

        /// <summary>
        /// Binds the controls contained on the preview tab to the provided settings object
        /// </summary>
        /// <param name="settings">The values to apply to the controls</param>
        void BindPreviewTab(PreviewTabSettings settings);

        /// <summary>
        /// Populates the list of preview rows with column data
        /// </summary>
        /// <param name="headers">The column headers to use</param>
        /// <param name="rows">The list of rows containing the column data</param>
        void PopulatePreviewRows(List<string> headers, List<string[]> rows);
    }
}
